package com.yjz.study.http.api

import com.yjz.common.restful.JCall
import com.yjz.common.restful.annotation.CacheStrategy
import com.yjz.common.restful.annotation.Filed
import com.yjz.common.restful.annotation.GET
import com.yjz.common.restful.annotation.Path
import com.yjz.study.http.entity.res.HomeModel
import com.yjz.study.http.entity.res.TabCategory
import com.yjz.study.http.entity.res.UserProfile

/**
 *作用 : 首页api
 *作者 : yjz
 *时间 : 2025/3/13 16:23
 */
interface HomeApi {

    /**
     * 获取主页类别
     */
    @CacheStrategy(CacheStrategy.CACHE_FIRST)
    @GET("category/categories")
    fun category(): JCall<List<TabCategory>>

    /**
     * 获取主页类别
     */
    @GET("home/{categoryId}")
    fun subCategories(
        @CacheStrategy cacheStrategy: Int,
        @Path("categoryId") categoryId: String,
        @Filed("pageIndex") pageIndex: Int,
        @Filed("pageSize") pageSize: Int
    ): JCall<HomeModel>
}